1. Field of the Invention
The present invention relates to an image processing apparatus, an image processing method, and a program. Particularly, the present invention relates to an image processing apparatus, an image processing method, and a program that enable an improvement in perceived image quality after gradation conversion.
2. Description of the Related Art
For example, in a case where an image of a large number of bits, such as an image in which each of RGB (Red, Green, and Blue) values is 8 bits, is to be displayed on a display of a small number of bits, such as an LCD (Liquid Crystal Display) capable of displaying an image in which each of RGB values is 6 bits, it is necessary to perform gradation conversion for converting the gradation level of the image.
An example of a method for performing the gradation conversion is an FRC (Frame Rate Control) process.
In the FRC process, the frame rate of images to be displayed on a display is adjusted to match the display rate of the display, the display rate being four times higher than the frame rate, for example, and then the images are displayed on the display.
That is, for example, assume that 8-bit images are to be displayed on a 6-bit LCD. When the focus is put on a pixel in a frame of the 8-bit images, the frame is called a target frame and the pixel is called a target pixel.
Also, assume that the frame rate (or the field rate) of the 8-bit images is 60 Hz and that the display rate of the 6-bit LCD is four times the frame rate of the 8-bit images, that is, 240 Hz.
In the FRC process, the frame rate of the images is controlled to be four times so that the frame rate matches the display rate of the display, and then images having a frame rate that has been controlled are displayed.
That is, four (=240 Hz/60 Hz) 1-bit values that correspond to lower two (=8-6) bits among 8 bits in total of a pixel value of the target pixel are represented by (b0, b1, b2, and b3).
A 6-bit value obtained by truncating the lower 2 bits of the 8-bit pixel value (the value obtained by simply quantizing the 8-bit pixel value into a 6-bit pixel value) is represented by X.
In the FRC process, basically, an 8-bit pixel value is converted into four 6-bit pixel values (the pixel values at the position of the target pixel in sequential four frames) X+b0, X+b1, X+b2, and X+b3.
Specifically, in a case where the 8-bit pixel value of the target pixel is 127 (=01111111B), B indicating that the preceding value is a binary number, a 6-bit value X obtained by truncating the lower 2 bits of the 8-bit pixel value is 31 (=011111B).
Also, as the four 1-bit values (b0, b1, b2, and b3) that correspond to the lower two bits 11B (=3) among 8 bits in total of the pixel value 127 (=01111111B) of the target pixel, (0B, 1B, 1B, and 1B) are used, for example.
Therefore, the 8-bit pixel value 127 (=01111111B) of the target pixel is converted into four 6-bit pixel values X+b0=31 (=011111B), X+b1=32 (=100000B), X+b2=32 (=100000B), and X+b3=32 (=100000B).
In the FRC process, a target frame is converted into four frames so that a frame rate matches the display rate of an LCD. Now, assume that the four frames are called first, second, third, and fourth frames in display time series. In this case, the pixel values of pixels at the position of the target pixel in the first to fourth frames correspond to the above-described four 6-bit pixel values 31, 32, 32, and 32 in the FRC process.
In the FRC process, the first to fourth frames are displayed on the LCD at a display rate four times the original frame rate. In this case, at the position of the target pixel, the 6-bit pixel values 31, 32, 32, and 32 are integrated (added) in a time direction in human vision, so that the pixel value looks like 127.
As described above, in the FRC process, 127 as an 8-bit pixel value is expressed by 6 bits in a pseudo manner with use of a time integration effect in which integration in a time direction is performed in human vision.
In the FRC process, a process of converting an 8-bit pixel value into four 6-bit pixel values is performed by using an LUT (Look Up Table) storing the 8-bit pixel value and the four 6-bit pixel values that are mutually associated.
Another example of the method for performing the gradation conversion is an error diffusion method (e.g., see “Yoku wakaru dijitaru gazou shori” by Hitoshi KIYA, Sixth edition, CQ Publishing, Co. Ltd., January 2000, pp. 196-213).
In gradation conversion based on the error diffusion method, noise shaping to a high range of spatial frequencies is performed on noise, which is a quantization error of a pixel value of a pixel that is spatially approximate to a target pixel, and the noise on which noise shaping has been performed is added to the pixel value of the target pixel, whereby error diffusion is performed (error diffusion of adding a quantization error of a pixel value of a target pixel to a pixel value of a pixel that is spatially approximate to the target pixel). Then, the pixel value to which the noise has been added is quantized into a desired number of bits.
The gradation conversion based on the error diffusion method is two-dimensional ΔΣ modulation in space directions, in which a pixel value is quantized after noise (quantization error) has been added thereto, as described above. Therefore, in a quantized (gradation-converted) image, it looks like PWM (Pulse Width Modulation) has been performed on pixel values that become constant only by truncating lower bits. As a result, the gradation of a gradation-converted image looks like it smoothly changes due to a space integration effect in which integration in space directions is performed in human vision. That is, a gradation level equivalent to that of an original image (e.g., 256 (28)-gradation when the original image is an 8-bit image as described above) can be expressed in a pseudo manner.
Also, in the error diffusion method, noise (quantization error) after noise shaping is added to a pixel value in consideration that the sensitivity of human vision is low in a high range of spatial frequencies. Accordingly, the level of noise noticeable in a gradation-converted image can be decreased.